home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-07 | 117.1 KB | 2,354 lines |
-
-
-
-
-
-
-
-
-
- ========================================================================
-
- GGGG h t
- G G h ttttt
- G h t i
- G GGGG rrrr aaaa pppp hhhh mmm mm aaaa t cccc aaaa
- G G r r a a p p h h m m m a a t i c a a
- G G r a a p p h h m m m a a t t i c a a
- GGGG r aaaa pppp h h m m m aaaa ttt i cccc aaaa
- p
- p
-
- ========================================================================
-
- Graphmatica
-
- Version 3.50b Sat 07 Dec 1996
-
-
- by Keith Hertzer
- Copyright (C) 1996 kSoft, Inc.
-
-
-
-
-
-
-
- System Requirements:
- --------------------
-
- IBM personal computer or compatible equipped with CGA, EGA, VGA, or VESA
- SVGA graphics, at least 256 KB of RAM, running MS-DOS version 2.0 or
- higher. Epson dot-matrix and HP DeskJet/LaserJet and compatible printers
- are supported. Microsoft and compatible mice are supported but not
- required for most functions. If you have a mouse driver installed,
- Graphmatica will automatically detect and make use of your mouse. See
- Section I for details on "mouse strokes."
-
- ----------------CGA users (if there still are any) NOTE:----------------
- If you have a CGA monitor and notice that the menus and dialog boxes
- are missing borders, you need to run the TSR program GRAFTABL.COM that
- comes with DOS 3.0 and later before starting Graphmatica. This will
- load the block graphics character generator which is sometimes not
- implemented in graphics modes in the CGA hardware.
-
-
-
-
-
-
- Graphmatica version 3.50b GRAPHMAT.DOC
-
- ======================================================================
- C O N T E N T S
- ======================================================================
-
-
- Section i: Introduction and Release Notes............................3
-
- Section I: Using Graphmatica.........................................5
-
- Section II: Using the Graph function.................................7
-
- Section III: Extended graph functions: polar, parametric, dif eq....16
-
- Section IV: Using AutoRedraw and the Redraw Queue...................20
-
- Section V: View: Changing the appearance of the screen..............23
-
- Section VI: Labels: Adding Explanatory Text to a Graph..............26
-
- Section VII: Options: Viewing and setting special options...........28
-
- Section VIII: Using a printer with Graphmatica......................30
-
- Section IX: Point menu: evaluating a graph at specific points.......32
-
- Section X: Calculus menu: Derivatives, Tangents and Integrals.......33
-
- Appendix A: Graphmatica's Command Line Arguments....................35
-
- Appendix B: Editing equation lists and GRAPHMAT.INI.................36
-
- Appendix C: Upgrade Notes: Changes from 3.30........................38
-
- Appendix D: Shareware / Order Form..................................40
-
-
-
- ----------------------Note: GRAPHMATICA FOR WINDOWS---------------------
-
- Graphmatica for Windows, version 1.5 is now available for Windows 3.1
- users. If Graphmatica for Windows isn't available from the source you
- got this file from, download it from CompuServe (in the math/science
- forum), FTP it from CICA, or send me $5 and I will send you a disk.
-
- -----------------------------------------------------------------------
-
-
-
- Section ==========================
- ii | Introduction and Notes |
- ==========================
- i
- i
- iiio 3
- ------------------------------------------------------------------------
-
- INTRODUCTION
-
- Graphmatica is an interactive algebraic equation grapher that can be
- used as an aide to plotting mathematical curves. While it is designed to
- be extremely simple to use, its advanced features may not be readily
- apparent to the first-time user. Please take a moment to acquaint
- yourself with them:
-
- 1. The Redraw Queue. Graphmatica remembers the last 25 equations you
- typed in or loaded from a file. You can save your work for use in a
- later session or with any text editor or Graphmatica 1.5 for Windows.
-
- 2. Automatic functions. Graphmatica will automatically
- + determine the type of graph you are entering based on the
- variables used,
- + recognize an equation's domain if you include one,
- + alter the sampling rate dynamically while graphing to make sure
- steep graphs like y=tan x are tracked correctly,
- + adjust the x/y ratio when you reset the range so proper aspect
- ratio is maintained,
- + redraw the most recently-entered equation(s) when you change the
- size or shape of the grid by any means, and
- + restore the grid and special options settings when you load an
- equation list that has them.
- You don't have to do anything to use these functions, but the
- Options menu still gives you complete control over them.
-
- 3. Advanced equation parser follows mathematical rules--not the
- computer's. You can use implied multiplication, a complete library of
- math functions (including trig), and even leave out those annoying
- parentheses in appropriate places. Forget about isolating variables
- before graphing! As long as there is only one instance of the
- dependent variable in the equation, Graphmatica will isolate it for
- you, and even graph relations. You also get the power of 6 styles of
- graphing: regular Cartesian, polar, parametric, and slope-field and
- initial-value approximations for up to fourth-order ODEs (and fourth-
- order linear systems as well), all detected automatically. Cartesian
- inequalities are supported as well.
-
- 4. Convenient controls: the status bar displays relevant information
- about the selected equation, and help or error messages, and the
- Redraw Queue combobox lets you select any equation in memory
- to graph, delete, or edit to form a new equation.
-
- 5. Pause and Print tables options let you see the coordinates of points
- on your graphs... as they are drawn. Print tables shows values at
- whole-number intervals so you can practice sketching curves yourself.
-
-
-
- i. Introduction and Notes 4
- ------------------------------------------------------------------------
-
- 6. Convenient mouse-oriented operations. You can use the mouse to select
- a new range or view the coordinates of a point, select the initial
- value for an ODE, and even find the tangent line of a curve or
- integrate a function without pressing a single key.
-
- 7. Flexible graph paper. Choose between regular graph paper and paper
- appropriate for trig, polar, and logarithmic functions, at four
- levels of detail.
-
- 8. Lots of output options. Graphmatica lets you export your graphs to a
- standard PC-Paintbrush (.PCX) file for inclusion into other documents,
- or print directly to any Epson-compatible dot-matrix or HP DeskJet,
- LaserJet, or compatible inkjet or laser printer.
-
- 9. Every automatic option is also user-settable to give you absolute
- control over your graphs. And the Save Setup Info command lets you
- save your preferences so they are automatically restored whenever you
- run Graphmatica.
-
- 10. Instructive help topics explain the basics of each type of graph,
- online help lets you brush up on most features without exiting the
- program, and included demo files show you examples of each form of
- equation. See the section below for a list of these files.
-
- DEMO EQUATION FILES
-
- Eight prewritten equation list files are included with Graphmatica to
- help demonstrate the kinds of graphs you can create and how to create
- them. Try loading each of them up, manipulating the view of the
- equations, redrawing, and modifying some equations. I suggest clearing
- the screen (if not the redraw queue as well) before loading a new file
- so the screen doesn't become too cluttered. Each file contains a
- different sort of graphs that you can draw with Graphmatica.
-
- DIFEQ.GR - sample differential equation approximations
- GRAPHMAT.GR - draws Graphmatica's name using parametric equations
- INEQUAL.GR - sample inequalities
- LOGLOG.GR - sample of logarithmic graph paper
- ODE2.GR - sample of second-order differential equations
- POLAR.GR - polar coordinates graphs
- TRIG.GR - trigonometric graphs
- XYDEMO.GR - Cartesian equations, quadratic equations, relations
- Read section IV (page 19) to learn how to use these demo files.
-
-
- -------------------------Note: ONLINE HELP FILES------------------------
-
- Please do not edit the files GRMAT1.HLP - GRMAT7.HLP They are formatted
- especially for use by the Graphmatica help view function. Altering these
- files may prevent effective use of the help text. These files are a
- subset of the information contained in GRAPHMAT.DOC, so if you want
- printed documentation, you don't have to print the .HLP files.
-
-
-
- Section =====================
- III | Using Graphmatica |
- I =====================
- I
- I
- IIIo 5
- ------------------------------------------------------------------------
-
- USER INTERFACE
-
- I've expended a significant effort to make the interface to Graphmatica
- for DOS as close to that of Graphmatica for Windows as possible,
- including writing my own menu and listbox routines. In general, I think
- the interface is pretty intuitive and consistent between the two.
-
- The EQUATION QUEUE COMBOBOX
-
- The main feature that makes Graphmatica unique is the equation queue
- combobox. Before you enter any equations, all you will see is the
- equation editing line at the top of the screen directly below the menu.
- Once you enter an equation, however, a down arrow will appear to the
- right of the edit line. Clicking on this arrow with the mouse or
- pressing the down arrow key brings down the listbox of the combobox,
- which shows you several of your equations at a time. Use the arrow keys
- to scroll up and down through the listbox; Graphmatica displays the
- status of each equation in the color it is drawn in as you highlight it.
- You can also move the highlight line by clicking on the up and down
- arrows on the scroll bar (when it appears). Click on an equation or
- press enter to select an equation. The listbox will close and the
- selected equation will appear in the editing area. You can close the
- listbox without selecting an equation by pressing Escape, clicking on
- the edit line, or raising the menu as detailed in the section below.
- The equation queue is "home base": after completing any operation,
- you will be returned without delay to the edit line with a copy of the
- current equation, ready to create a new equation and graph it.
- Graphmatica operates on the object-action interaction model: i.e.,
- first select an object (equation) to act on, and then select an action
- to perform on it. You must select an equation from the combobox BEFORE
- you choose a menu item to apply to it; the program will not prompt you
- for which equation to redraw, evaluate a point from, or delete.
-
- POP-UP PROMPTS and the Graphmatica EDITOR
-
- Most data input in Graphmatica is done through pop-up "dialog boxes"
- which appear in the middle of the screen. (Of course, the equation input
- takes place in the combobox at the top of the screen.) If there are
- additional instructions, they will replace the menu bar on the top line.
- The input editor makes full use of the standard editing keys: Insert,
- Delete, Backspace, Left and Right arrow keys, Home, and End. Escape
- clears the entire field. The flashing cursor shows the current position
- and is either an underscore or a full block to indicate normal
- (overwrite) or insert modes. The editor can handle lines longer than the
- actual display space. When you move the cursor near the edge of the
- field, for equations and titles, it will automatically scroll to show
- you the rest of the line.
-
- Usually if you choose a function by mistake and it presents you a pop-up
- prompt, pressing enter or ESC on the blank field will return you to the
- equation editor as if you had never selected the option. Note that this
- is not true for the Range function; if you press ESC at all 4 prompts
- the current range will be preserved, BUT the screen will clear.
-
-
-
- I. Using Graphmatica 6
- ------------------------------------------------------------------------
-
- MENUS
-
- All features of Graphmatica are available through drop-down menus, which
- operate in a manner pretty close to Windows. (The one exception is that
- they are not technically "pull-down" like the Macintosh's; you must
- release the mouse button before the drop-down menu will appear.)
-
- You have a choice of several ways to select menu items. If you have a
- mouse, just point and click. You can also use the keyboard in several
- ways. Note that to activate the menu for the first two ways you must
- first press the Alt key or F10. (Pressing the Alt key or Escape exits the
- menu, in case you decide you actually want to continue editing.)
-
- 1. Cursor keys: As you navigate through the menus with the cursor keys,
- an explanation of the highlighted option appears on the bottom line of
- the screen. Highlight the option you want by using the left and right
- cursor keys. Select the highlighted option in the top bar by pressing
- enter. Most top-level items call up a secondary drop-down menu.
- Highlight the item you want using the up and down cursor keys. Select
- the highlighted item by pressing enter again. To cancel the menu and
- return to the top bar, press Escape. Or, use the left/right cursor keys
- to move to the next item on the top bar.
-
- 2. Alphabetic/mnemonic keys: Each menu item also has associated with it
- an alphabetic accelerator key that is shown in a different color when
- the menu is activated. Pressing this letter selects that menu item.
- Most (but not all) of these letters are the first in the word, so after
- a while they are easy to remember. Thus, to select the menu item _P_aper
- in the _V_iew menu, where underlines indicate highlighting, you would
- press Alt, V, P. Holding down Alt is OK, too.
-
- 3. Function keys: This is not the most intuitive way around, but I left
- it in for old times' sake. If you prefer, you can use function keys;
- they select the options in the current menu in the order they appear on
- the screen. (i.e. in the main menu, F1 selects File, F2 Redraw, etc., and
- F7 selects Help. In the View menu, F1 would select Clear, F2 Paper, and
- so on.) Sorry, function key labels aren't available, but there are not
- many options to learn. If you use function keys, though, you do NOT need
- to press Alt or Enter to select items.
-
-
- CHOICE BOXES
-
- For prompts where you must choose between several options, (i.e. yes or
- no questions) Graphmatica displays a dialog box with instructions and
- two or more pushbuttons. You can respond to these either by clicking on
- the desired button with the mouse, or by pressing the highlighted letter
- of your choice. In addition, you can use the left and right arrow keys
- to highlight your choice with the double border, then press Enter or the
- space bar to select it. To cancel the dialog box, click the right mouse
- button or press Escape. This does whatever is appropriate at that point
- to evade the question and return you to the equation editor. If you
- don't know how to answer a prompt, Escape will never hurt.
-
-
-
- I. Using Graphmatica 7
- ------------------------------------------------------------------------
-
- HINTS FOR MOUSE USERS
-
- Graphmatica has internal support for Microsoft (R) and compatible mice.
- If a mouse driver is installed when you run Graphmatica, it will
- automatically be detected and the usual mouse arrow will appear. To use
- the mouse on the menus, you simply "point and click." However, there is
- much more you can do with the mouse in Graphmatica:
-
- 1. The left button, as usual, is always used to select an item or
- emulate a keystroke. Whenever you see a prompt that says "Press
- any key...", clicking the left button will have the same effect
- as hitting a key.
- 2. The right button has the same effect as pressing the ESC key
- whenever pressing ESC is a valid option. To get out of a
- menu, you can click the right button.
- 3. Whenever you are using Graphmatica's input editor, the mouse can
- be used to do two things: Pressing the right button, as usual,
- causes the same effect as pressing the ESC key. You can also
- position the cursor inside the edit field by clicking the left
- button on the space you want to move to.
- 4. In the equation combobox and file selector, clicking on the up or
- down arrows on the scroll bar to the right of the listbox is
- equivalent to pressing those keys, and moves the highlight up or
- down one line. However, the rest of the scrollbar is display only;
- you cannot click on the track or drag the thumb to change the
- contents of the listbox.
- 5. To use the mouse to scroll through a help file, click on the key
- name (highlighted in red on the bottom line of the screen which
- corresponds to the action you want to perform. In addition,
- clicking the right mouse button corresponds to the escape key.
- 6. The mouse is not available during the actual graphing loop, to
- prevent the pointer and the graph drawing routine from fighting
- over the screen. To pause the graph, you must use the keyboard.
- The mouse can be used to restart or cancel the graph at this
- prompt though.
- 7. To select a graph into the equation editor, simply position the
- pointer over any part of the curve and click the left button.
- 8. To zoom in to a region on the screen, drag the mouse over the grid
- to highlight the area you want. The selection is constrained to keep
- a constant aspect ratio, so vertical movement is basically ignored.
- Just move the pointer up or down slightly and then mark out the area
- by moving across the screen. Then choose Range from the View menu to
- set a new range.
- 9. To use the coordinate cursor to get a quick look at the coordinates
- of a point without using the menu, hold down the right mouse button
- while the pointer is over the grid.
-
-
-
- Section ===================================
- III III | Entering and graphing equations |
- I I ===================================
- I I
- I I
- III IIIo 8
- ------------------------------------------------------------------------
-
- GRAPHING CARTESIAN FUNCTIONS
-
- So now that the cursor is blinking in the equation editor, what do you
- do? Just type in an equation and press enter. If you've used a
- programming language, spreadsheet, or math package on your computer
- before, you probably already know the basic format by heart. Just take a
- look at the sample files to make sure you know what everything means. If
- you're confused about how to specify division or exponents, see the
- operator table on the next page.
-
- Here are the ground rules for normal Cartesian equations:
- + Always use exactly one "=" per equation
- + Always use exactly one "x" or "y"; you cannot use more than one of
- both variables.
- + Always put some sort of expression on both sides of the "="
- + An expression consists of any mathematically meaningful combination of
- decimal numbers, binary operations like + and *, parentheses,
- functions, and variables or constants.
- + Spaces are completely optional, except where they serve to separate
- alphabetic identifiers.
- + The order of operations is the standard algebraic left to right of:
- Functions
- Parentheses
- Exponents
- Multiplication and division
- Addition and subtraction
-
- Graphmatica supports implied multiplication of variables and constants
- as in "3x" or "5(2x+3)", but variables and other alphabetic
- identifiers such as functions and constants MUST be separated by a space
- or they will not be correctly identified. Thus "xx", "xcos(x)", and
- "xpi" are not recognized, while "x*x" and "x pi" are OK. (Implied
- multiplication of the two variables x and y [e.g. "xy=1"] IS supported
- as a special case, however. I still recommend including the times sign
- in these cases for clarity.) Although I have greatly refined it in
- recent releases, the parser may still misinterpret some complex
- expressions for no apparent reason. Keep trying! I suggest liberal use
- of parentheses: if you are not sure whether something will be
- interpreted correctly, go back and put parentheses around it.
-
-
- CALLING FUNCTIONS
-
- The argument to a function is determined by a simple rule which lets you
- avoid using parentheses in most cases: if the next non-blank character
- after the function name is not "(" then Graphmatica picks out the next
- complete term as the argument. A term is defined as the product of any
- number of factors, each possibly raised to a power. Thus the following
- expressions are all equivalent:
-
- sin 6x^2 + 2 sin 2*3*x^2 + 4 sin (6x^2) + 4
-
-
-
- II. Entering and graphing equations 9
- ------------------------------------------------------------------------
-
- OPERATORS, FUNCTIONS, AND VARIABLES
-
- Graphmatica uses an operator set almost identical to BASIC's, with a few
- additions. The supported operators and functions are as follows:
-
- Operator Meaning
- ================= ==============================================
- +, -, *, / Add, subtract, multiply, divide
- ^ Exponentiation
- [( )] Parentheses: may be nested to any extent,
- brackets are provided for ease of reading but
- parser WON'T differentiate between "(" and "["
- ; (semicolon) Separate halves of a parametric equation
- ' (single quote) Make rest of the equation a comment
- { m, n } Specify domain, where 'm' is the start of the
- domain and 'n' is the end. Either end may be
- left open by omitting 'm' or 'n'.
-
- Function Meaning
- ================= ==============================================
- abs absolute value
- acos, asin, atan arc cosine, arc sine, and arc tangent
- asec, acsc, acot arc secant, arc cosecant, and arc cotangent
- cos, cosh cosine and hyperbolic cosine
- cot cotangent (1/tan)
- csc cosecant (1/sin)
- exp Euler's number to the specified power
- int greatest integer ([x] is not supported)
- ln, log natural logarithm, logarithm base 10
- sec secant (1/cos)
- sin, sinh sine, hyperbolic sine
- sqrt (or sqr) square root
- tan, tanh tangent, hyperbolic tangent
-
- Variables Usage
- ================= ==============================================
- x, y rectangular coordinates
- r, t r and theta in polar coordinates
- x, y, t x and y as functions of t in parametric form
- x, t, dx dif-eq mode, solves first order o.d.e.
- [or y, x, dy] dx is actually dx/dt in dx/dt = f(x,t)
- d2x, d3x, d4x second, third, fourth order differentials
- t,x,y,z,w,dx...dw solves up to 4th order linear system of ODEs
- a user-settable free variable; can specify range
- and step rate to calculate several values
-
- Constant Value
- ================= ==============================================
- b, c user-settable free variables (constant)
- d converts degrees to radians = pi/180
- e Euler's number = 2.718...
- pi (or p) pi = 3.14159...
-
- Note: by default, all trig functions work in radians, not degrees. You
- can convert using the constant d: e.g. sin(45d) = sin (pi/4)
- cos (x*d) = cosine of x, in degrees (you will need to change the range
- of x to 0 to 360 to get the full graph)
-
-
-
- II. Entering and graphing equations 10
- ------------------------------------------------------------------------
-
- GRAPHING RELATIONS
-
- Graphmatica's equation parser will automatically isolate the variable
- "y" wherever it is in the equation. It will graph some relations, like
- circles ("x^2+y^2=36") and ellipses ("x^2/3 + y^2/4 = 20"), as well as
- hyperbolas and many other conic sections. (Consult a good Algebra
- textbook for help on their formulas.) It will also graph equations that
- are functions of y, not x (i.e. there are 0 or >1 occurrences of "y"
- but only one of "x" found). However, Graphmatica cannot perform the
- factoring needed to isolate a variable when it occurs more than once so
- implicit functions or relations like "x^2 - x = y^2 +4y" cannot be
- graphed. The relation graphing module (for graphs which may have more
- than one y value for a given x value) works like this: if in isolating
- the "y" in an equation Graphmatica finds an even power of it (i.e.
- "y^2"), it solves for both the positive and negative roots. This method
- by no means covers all possible relations, but it is adequate for the
- most common.
-
- GRAPHING INEQUALITIES
-
- You can graph rectangular-coordinate inequalities by replacing the '='
- with '<' or '>' for many simple functions and relations. This feature is
- presently only available for cartesian graphs. (Also, since the free
- variable 'a' implies that more than one curve will be drawn, equations
- containing 'a' are incompatible with inequalities, and the parser will
- not accept any inequality that uses 'a'.)
-
- The region that solves the inequality is hatched in with the graph
- color. (The curve itself is not actually dotted to indicate a strict
- inequality, however, so '<' is effectively "less than or equal to".) In
- most cases, asymptotes are detected and a boundary added there as
- appropriate, so graphs like "y < tan x" and "xy > 1" are drawn
- correctly. In addition, the valid domain of the function being graphed
- is detected automatically, so "y > log x", for instance, shades only the
- first and fourth quadrants.
-
- To accommodate intersecting regions, the graphing routine alternates
- between '\' and '/' hatching. Best results will be obtained when you
- graph no more than two inequalities on the same screen. Not only does
- this make it easier to interpret the graph, but it can also prevent
- conflicts between graphs that cause the inequality to shade incorrectly.
- The graphing routine first defines a region by solid lines in the
- current graph color plus the edges of the screen. It then "seeds" this
- region, which may be discontinuous, in one or more places, and flood-
- fills it. Since the flood-fill operation does not know anything about
- the actual curves, but rather stops as soon as it finds the boundary
- color, the region MAY SHADE INCORRECTLY if another graph of the same
- color intersects it.
-
- Unfortunately, in 2-color modes (CGA and MCGA) every feature of the grid
- is the same color as the graphs. Because the fill routine is not very
- robust, even graph paper interferes with the shading if a hatched
- pattern is used. Therefore, a 50% gray pattern is used instead to graph
- inequalities accurately in monochrome modes. Sorry if this wears down
- your printer ribbon, but there is nothing I can do about it without
- writing my own fill routine. Also note that this method does not
- accommodate intersecting regions gracefully.
-
-
-
- II. Entering and graphing equations 11
- ------------------------------------------------------------------------
-
- SPECIFYING THE DOMAIN
-
- Graphmatica allows you to specify the domain of each equation
- independently. This allows you to draw only a particular part of a graph
- or change the domain without using the Range or T range functions to
- change the default domain. To specify a domain for an equation, type
- anywhere on the line the expression
- { m, n }
- where 'm' is the start of the domain and 'n' is the end. If you want the
- domain to start at the default start, leave 'm' out. Then, whatever you
- change the start of the default domain to, that will always be where the
- equations starts graphing. To leave the end of the domain open, leave
- out 'n'. So if the range on-screen is (-10,10), specifying a domain of
- "{ ,5}" will graph from -10 to 5, and one of "{-4, }" from -4 to 10.
-
- To graph a parametric equation, you MUST specify a domain that is closed
- (i.e. one that has neither number left out).
-
- The domain is parsed like any other expression, so you can use all of
- the arithmetic operators and functions available in the rest of the
- equations, as well as numbers and the constants d, e, and pi. The only
- restriction is that you may not use a variable (see table, page 7) in
- your domain, since this would yield ambiguous results.
-
-
- USING FREE VARIABLES
-
- In any equation, in addition to the pre-programmed constants such as e
- and pi, you can also include the free variables 'b' and 'c' which you
- can define yourself. These parameters are effectively symbolic constants
- that make it easier to "play around" with the exact shape of the curve
- without editing the equation extensively.
-
- The values of parameters used in each equation must be specified along
- with that equation, but if you don't type them in explicitly,
- Graphmatica will prompt you for the value(s) and insert this
- information in the equation for you. If you want, you can type in a
- value manually using a format similar to the domain specifier described
- above, for example:
- {b: 1} {c: -1/2} {b: -pi/4}
- As usual, enclose the "domain" in curly braces. You must specify which
- parameter you want to set by its name ('b' or 'c') and a colon, followed
- by a value, which can be any expression that evaluates to a constant.
- You may not use other parameters either, since this could become self-
- referential.
-
- You can change the value of a free variable after you have typed in
- equations and Graphmatica will automatically update and redraw all of
- the graphs using it with the new value. See section .... for details.
-
-
-
- II. Entering and graphing equations 12
- ------------------------------------------------------------------------
-
- GRAPHING FAMILIES OF FUNCTIONS
-
- The third free variable, 'a', is fundamentally different because you can
- specify not just a single value, but a range of possible values that it
- can take. This allows you to graph families of functions or level curves
- of a 3-D surface easily. For instance, "y = a*cos(x)" will graph cosine
- curves of varying amplitudes, and "x^2+y^2 = a" will draw level curves
- of the surface "f(x,y) = x^2+y^2".
-
- You don't even need to know the syntax described below to use this
- feature, since Graphmatica will prompt for the needed values and insert
- them in the equation for you. If you don't specify a range for 'a',
- Graphmatica will ask you for three values: the start of the range, the
- end of the range, and the amount to step by. Graphmatica starts by
- graphing the function with 'a' set to the start of its range, and then
- increments 'a' by the step value and draws another graph until 'a'
- exceeds the end of its range. (You can also specify a negative step
- value as long as the end of the range is less than the start.)
-
- To type this information in on the command-line, add the domain
- specifier "{a: start, end, step}" to your equation, replacing "start",
- "end", and "step" with the desired values. For example, "y=a*cos(x)
- {a: 1,6,2}" will draw graphs of y=cos x, y=3cos x, and y=5 cos x.
-
- Although the program does not put any limit on the number of curves in
- the "family" you can graph, be aware that this feature uses memory
- rapidly. In any case, the screen will likely become too cluttered to be
- useful if more than ten or so graphs are drawn, so try to make your step
- rate proportionate to the size of the range.
-
- DRAWING THE GRAPH
-
- Once you have entered an equation that parses successfully and pressed
- enter, Graphmatica will proceed to graph it. To interrupt a graph when
- the computer is in the process of drawing it, hit any key and the
- program will display on the bottom line the message:
- "PAUSE at x=#, y=#. Press ESC to quit, any other key to restart.. "
- where # indicates the x and y coordinates you stopped it at. If you
- mistyped the equation and want to fix it, just press ESC.
-
- Be patient! Graphmatica may need a while to produce a quality graph on a
- slower machine. To speed up the graphing, you may want to select a lower
- Fineness value.
-
- When the graph for your equation is complete, the blinking cursor will
- reappear in the equation editor. If you'd like to start over with a
- completely different equation, press ESC to clear the input field. If
- you'd rather modify the last equation, go right ahead; it's already
- stored safe and sound in the redraw queue (for more information see
- Section IV: Using AutoRedraw and the Redraw Queue). Or you can modify
- any previously entered equation by pressing the down arrow key (or
- clicking on the down arrow next to the editing field) to drop down the
- equation queue listbox and then selecting an equation from the redraw
- queue. You can then redraw this equation by pressing enter, or modify it
- to create a new equation. To access Graphmatica's other features, press
- Alt or hit escape on a blank line to raise the menu, or click on the
- desired menu item with the mouse.
-
-
-
- II. Entering and graphing equations 13
- ------------------------------------------------------------------------
-
- ERROR MESSAGES
-
- A number of error messages may be encountered when graphing (apart from
- messages ingrained in the library functions which I cannot control).
- Many of them are fatal; the equation cannot be graphed and you must
- edit it. They will cause the computer to beep so you know there is a
- problem. The other five apply only to specific point(s) for which a y-
- value cannot be generated. They will not appear unless you ask for them
- using the Warnings option and then they appear silently.
-
- [Please note that all warning messages which refer to the variables 'x'
- or 'y' will actually be 't' or 'r' when you are dealing with a polar
- equation.]
-
- "Please type an equation (or select from the listbox); then press <-'
- to graph."
- You pressed enter on the graph line without selecting or typing in
- an equation.
-
- "One or both sides of equation evaluated to nothing. Please edit your
- equation."
- Make sure there is some sort of expression on each side of the
- equation. Obviously, an entry like "y=" can't produce a meaningful
- graph.
-
- "No equals sign or more than one found. Press any key to edit the
- equation."
- To be a valid and graphable, your equation must include exactly
- one equals sign ['=']. If you get this error, you either left out
- the '=' or accidentally typed two or more of them. For parametric
- equations, there must be an '=' on each side of the dividing ';'.
-
- "No dependent variable or more than one 'y' found. Please edit your
- equation."
- Although Graphmatica can isolate ONE 'y' or 'x' variable and graph
- some relations, it cannot perform the factoring needed to isolate the
- a variable when both 'x' and 'y' occur more than once. It also
- cannot plot polar graphs as a function of r instead of t or isolate
- 'r' when more than one instance is found. If you can adjust the
- equation so it uses only one instance of the dependent variable, do
- so; otherwise it can't be graphed. In parametric graphing, this
- message may also indicate that no 'x' variable was found in the x(t)
- equation.
-
- "Inequalities only supported for rectangular equations. Replace < or >
- with =."
- Inequalities cannot presently be evaluated for polar, parametric, or
- differential equations. You may still be able to draw the graph if
- you can express the inequality in rectangular form.
-
- "Found unknown variable or function. Press any key to edit the
- equation."
- Unfortunately, the evaluator isn't set up to return what caused
- the error, so you'll have to look for it yourself. Check that your
- equation contains only valid identifiers (x, y, pi, d, e, r, t, a,
- b, and the functions listed above) and that you separated each of
- them with an operator, space, or some other punctuation.
-
-
-
- II. Entering and graphing equations 14
- ------------------------------------------------------------------------
-
- ERROR MESSAGES, continued
-
- "Found bad operation or mismatched parentheses. Press any key to
- edit..."
- You either left out a paren somewhere, left out one or both
- of the operands for a binary operation or the argument for a
- function, or typed some other weird thing the parser and evaluator
- couldn't digest. Examine your equation carefully and fix whatever
- seems to be the problem.
-
- "Missing argument to a binary operation or function. Please edit your
- equation."
- The parser couldn't find any identifiers or expressions to use as
- one of the operands to a binary operation (like '+') or as the
- argument to a function, like cos(x). All of Graphmatica's
- functions require one argument following the function name.
-
- "Can't find the inverse of this function of y. Press a key to edit
- equation."
- You tried to graph an equation like "int(y)=x" for which y cannot be
- isolated by taking the inverse of the function. The functions which
- cannot be isolated are "cosh", "sinh", "tanh", and "int". If you
- can't adjust the equation so this error does not occur, it is not
- graphable.
-
- "Parametric equation requires that you specify domain! See 'Graph' help
- file."
- You typed in a parametric equation (or accidentally hit the
- semicolon) and neglected to include a closed domain [like {1,6}].
- Because the diversity of parametric equations makes it hard to pick
- a default domain, you have to include one with each parametric
- graph. See above in this section for help on giving the domain and
- below in Section III for help on parametrics.
-
- "Domain did not evaluate to a constant value. Press a key to edit
- equation."
- The domain you entered either could not be parsed, or was found to
- contain a non-constant identifier, like x or y. Valid domains must
- have at least one side of the range defined and can't contain
- variables, although any other expression that evaluates to a
- constant is OK.
-
- "Not enough initial values to draw graph. Make sure there are # and try
- again."
- Although first-order ODEs may be graphed as a slope-field without
- providing an initial value, second and higher order equations
- require that you provide initial values for t, x, dx..., up to the
- derivative one order less than the highest one in the equation. Make
- sure that you have specified the right number of valid IVs.
-
- "Cannot accurately draw the graph of a discontinuous function (like
- y=w^x, w<0)"
- The correct graph of this class of functions has singularities all
- over the place and thus cannot be drawn accurately using the
- algorithms Graphmatica normally uses on smooth curves.
-
-
-
- II. Entering and graphing equations 15
- ------------------------------------------------------------------------
-
-
- WARNING ERROR MESSAGES
-
- "Overflow at x=#.##."
- Some function or operation generated a number too large to fit
- into a 8-byte floating point variable. The point at x=#.## was not
- graphed. This error is not fatal, so the graphing process is
- continued, but if the message is repeated and no image is graphed,
- you may need to abort graphing and look at your equation again.
-
- "Division by zero at x=#.##."
- At x=#.## your equation included division by zero so that point
- was skipped. Unless you get this error repeatedly, there's no real
- problem.
-
- "Can't raise a negative number to a fractional power. [x=#.##]"
- Due to the possibility of getting an even root of a negative
- number (like -16^(1/2) which actually equals the square root of
- -16), the C Library pow() function refuses to process any
- arguments like these. This is not a fatal error, and the portion
- of your graph (if any) where the base is not negative or the power
- is not fractional should be graphed perfectly. This error also
- occurs when you try to take the square root of a negative number
- with the "sqr" function.
-
- "Can't find the logarithm of a negative number. [x=#.##]"
- The natural logarithm (ln) and base 10 logarithm (log) functions
- are defined only on x greater than zero.
-
- "Inverse of abs() not defined on negative numbers. [x=#.##]"
- This reminder warning occurs when you graph a curve like abs(y)=x
- without restricting the domain of the expression equal to abs(y) to
- be positive.
-
- "Domain error: asin/acos functions defined only on -1<=x<=1. [x=#.##]"
- The arcsine (asin) and arc cosine (acos) functions are only
- defined between -1 and 1 (the range of the sin and cos functions).
-
-
-
- Section ============================
- III III III | Extended Graph Functions |
- I I I ============================
- I I I
- I I I
- III III IIIo 16
- ------------------------------------------------------------------------
-
- INTRODUCTION TO POLAR GRAPHS
-
- Polar coordinates are a fundamentally different approach to representing
- curves in two-dimensional space. The concept is pretty easy to grasp
- graphically, but if you have never used polar coordinates and want to
- understand them, you should probably read the section below.
-
- The traditional Cartesian method relies on an x and a y coordinate to
- mark how far a point is from the axes in two perpendicular directions;
- polar coordinates plot the location of a point by one coordinate
- represented by the greek letter theta (looks like an O with a line
- through the middle--one of these methods should print it: Θ or O-) which
- is simplified to "t" in Graphmatica and another called "r". The "t"
- tells what direction to go in from the origin, and the "r" tells how far
- to go out in that direction to reach the point. The direction is
- measured in radians as an angle starting from the positive side of the
- x-axis and turning around counter-clockwise (like measuring the angle
- the hand on a clock has traveled starting at the 3 o'clock position and
- going backwards). There are 2pi radians in a complete circle,
- corresponding to 360 of the degrees you're familiar with. To put a polar
- coordinate into Cartesian terms in order to graph it, we use the
- equations: x = r cos (theta) and y = r sin (theta).
-
- To make a graph using polar coordinates, we let theta be the independent
- variable and calculate a distance to plot out from the origin as we let
- the angle sweep around in the positive direction. The domain for the
- graphing is 0 to 2pi (the first complete circle in the positive
- direction), but you can easily change these values using the "T range"
- function in the View menu [see Section V]. Polar graphs can be entered
- in the equation editor just like normal graphs. The only difference in
- what you type, and the way Graphmatica detects a polar graph, is that
- you must use the variables "t" and "r" instead of "x" and "y". The
- restrictions are still the same: you can have one and only one instance
- of the dependent variable "r," although it can be located almost
- anywhere in the equation. You can embed the "r" in a term like "r^2" to
- graph functions that cannot be simplified by normal means and
- Graphmatica will evaluate both positive and negative roots automat-
- ically. You should watch as your graph is drawn, because often the
- direction it is going is almost as important as the figure it draws.
- (When you have a "double" equation with "r^2" in it, though, note that
- the positive roots are drawn first and then the negative roots are
- drawn: theoretically they should be drawn simultaneously, but this is
- not practical.)
-
- Please note that the x and y coordinate ranges and the range for the
- variable theta function completely independently; in normal Cartesian
- graphing, theta's value is irrelevant, and in polar graphing, theta
- controls the domain of the graph, but the x and y ranges still control
- the physical screen you see. If you want to change your view of a polar
- graph, you use the scale or range functions just as you would normally.
-
-
-
- III. Extended graph functions 17
- ------------------------------------------------------------------------
-
- INTRODUCTION TO PARAMETRIC GRAPHS
-
- Parametric graphing, like polar graphing, uses a different method of
- calculating points on the plane to come up with curves that may be
- difficult to compute using normal rectangular coordinates. They are
- unique in that the cartesian x and y coordinates are calculated based on
- a third variable (the "parameter" of x and y) which is traditionally
- called 't' (not to be confused with the 't' used by Graphmatica to
- represent theta). T is allowed to increase from the start of the domain
- you specify to the end. At each value, the functions x(t) and y(t) are
- calculated to give an (x,y) coordinate which is graphed. Graphmatica
- then connects these points to form a smooth curve--if something you
- graph begins to look jagged, you probably need to adjust the fineness.
- (Parametric graph fineness is linked to the same fineness control as
- Cartesian and polar graphing, and should be decent at the default
- fineness value, but if you need to, you can increase or decrease this
- value. Be aware that this will affect the fineness of non-parametric
- graphs as well. See Section VII "Adjusting the Fineness" for details.)
-
- To enter a parametric graph, you need to remember four basic parts: the
- x(t) and y(t) functions, the semicolon between them (this is how
- Graphmatica knows it's a parametric graph), and the domain for t.
- semicolon
- x-function | y-function domain
- | | | |
- x = 2t ; y = 2t^2 {-10, 10}
-
- Although as in all other Graphmatica equations you don't need to solve
- for x and y (i.e. t=5x would be OK), only one x and one y can appear in
- the whole equation, and "double" equations like "x^2=t" where
- Graphmatica would normally solve for both the positive and negative
- roots are NOT supported (you can enter them but only the positive root
- will be found; each equation in the redraw queue is allowed enough space
- to hold two computable expressions, and either a double equation or an
- x/y pair of parametric equations will fit, but not both). You can type
- the x and y equations in in either order, as long as they are separated
- by a semicolon, and the domain will be recognized anywhere on the line.
- You MUST specify a domain for each parametric equation! The variety of
- curves that can be drawn with parametric equations is great and makes
- choosing an appropriate default domain impossible. Some curves (like
- those including the circular functions sine and cosine) tend to work
- best over a {0,2pi} domain, like polar graphs. Others will match up
- better with the default domain of the normal graphs, the size of the
- viewing area. Some have a very compact domain, between say 0 and 1,
- where they will appear on the screen. If you over- or under-estimate the
- domain, you can always abort the graph and edit your equation.
-
-
-
- III. Extended graph functions 18
- ------------------------------------------------------------------------
-
- COMPARISON OF THE THREE GRAPHING TECHNIQUES
-
- While some curves can be drawn by cartesian relations, polar
- coordinates, and parametric functions, each technique is better suited
- for some graphs than for others. For instance, a circle with radius 5
- around the origin which can be produced by the equation
- x^2 + y^2 = 25
- can be drawn faster by the parametric equations
- x = 5 cos (t) ; y = 5 sin (t) {0, 2p}
- and can be drawn faster and much more simply by the polar graph
- r = 5.
-
-
- GRAPHING APPROXIMATIONS OF DIFFERENTIAL EQUATIONS
-
- Graphmatica also provides the ability to approximate the solutions of up
- to fourth-order ordinary differential equations. [I will not provide
- background material on this function because if you need to use it, you
- probably know more about differential equations than I do.] To let the
- parser know you want to graph a differential equation, you must include
- the differential "dx" (which actually represents dx/dt) as one of your
- variables. If you specify an equation as dx = f(x,t) where f(x,t) is
- some combination of the variables x and t (such as "x^3 + t" or "t * x")
- and do NOT include the domain operator "{ , }", the program will draw a
- slope field for dx/dt = f(x,t), with t as the horizontal axis and x the
- vertical. Note that you can also use the notation dy = f(y,x) if you
- prefer; both sets of variables are automatically recognized as
- differential equations.
-
- If you do include a "domain" {m, n}, however, it will not be interpreted
- as a domain but will instead indicate that you want to graph a specific
- solution to the initial-value problem x(m)=n by Runge-Kutta approximation.
-
- Graphmatica will also solve second, third, and fourth order initial-
- value problems using a Runge-Kutta method for linear systems. To specify
- a second or higher order derivative, use the variables d2x, d3x, or d4x.
- Remember that for an nth order equation, you must also specify n+1
- initial values. You can type these into the equation using the "domain"
- notation described above; the order of values is t, x, dx, d2x, d3x.
- Thus d2x + x=0 {0,0,1} graphs a sine curve as the solution to
- "d^2x/dt^2 + x = 0" for x = 0 and dx/dt = 1 at t=0.
-
- In addition, you can specify an initial value by moving the crosshairs
- around with the arrow keys or mouse. Type in an equation to add an IV to
- or select an equation to modify and choose the Set IV option from the
- Point menu. Move the cursor to the desired location and press enter or
- click the left mouse button to add the initial value point to the
- selected equation. For second-order or higher ODEs, you can also specify
- the first derivative using the mouse or arrow keys. After you select the
- IV point, Graphmatica displays a "rubber band" line from this point to
- the current position until you click/press enter on a second point. The
- coordinates of the first point are then taken to be the t and x values
- for the IV, and dx/dt is initially set to the slope of the line between
- the two points. If required, further initial values will be requested
- via dialog boxes.
-
-
-
- III. Extended graph functions 19
- ------------------------------------------------------------------------
-
- SYSTEMS OF DIFFERENTIAL EQUATIONS
-
- Graphmatica can also approximate the solutions of up to fourth-order
- systems of ordinary differential equations. [Refer to your local
- textbook for more background information.] You can pose your system in
- either of two sets of variables: { t, x, dx, y, dy, z, dz, w, dw} or
- { t, x1, dx1, x2, dx2, x3, dx3, x4, dx4 }. In each case, t is the
- independent variable, and the variables dX are the derivatives dX/dt.
- You specify the complete system in a manner similar to parametric
- equations, namely (for a fourth-order system):
-
- dx=f1(x,y,z,w,t); dy=f2(..); dz=f3(..); dw=f4(..) {t0,x0,y0,z0,w0}
-
- where f1...f4 are some functions of the variables x,y,z,w, and t, and
- x0...w0 are the initial values of the system at t0. (You need not
- isolate the differentials on the left of the equals sign, but you can only
- use one per equation.) Separate equations with semi-colons, and enclose
- the initial values in curly braces.
-
- If you want to graph a third- or second-order system, just leave out the
- equations for dw, or for dz and dw, and use the appropriate number of
- initial values instead.
-
- Note that to simplify the process of parsing the system and associating
- each equation in the system with a graph, the order of equations dx,
- dy,dz,dw (or dx1, dx2, dx3, dx4) is required, and the program will not
- graph a system whose equations are listed in the wrong order.
-
- The values for each curve in the system are calculated simultaneously,
- but only the curve for x(t) is drawn as it is calculated; the others are
- displayed as soon as calculation is finished. Each curve plots in a
- different color, which corresponds to the color of its equation in the
- system when it is listed in the status bar.
-
- You may choose to plot an alternate coordinate space using the "vars"
- domain: for instance, adding "{vars: x,y}" to an ODE system will plot
- the solution for x against y over the default interval of t.
-
- The algorithm used to compute all of the ODE approximations described
- above is the 4th order Runge-Kutta routine with adaptive step size
- documented in chapter 15 of "Numerical Recipes in C".
-
- You can also choose the initial value points using the mouse. The
- procedure is the same as the one for a single ODE, except for systems of
- ODEs, this function allows you to click on 2, 3, or 4 initial value
- points, one for each equation in the system. Since all IVs are required
- to be at the same coordinate for t, after selecting the first IV you are
- restricted to selecting points on the vertical line defined by the t-
- coordinate of your first click. Graphmatica marks each IV as you select
- it so that you will not forget how many IVs you have placed already and
- how many you have left.
-
-
-
- Section =========================================
- III VVV VVV | Using AutoRedraw and the Redraw Queue |
- I V V =========================================
- I V V
- I V V
- III V o 20
- ------------------------------------------------------------------------
-
- USING AutoRedraw
-
- Whenever you change the scale to look at a graph in greater detail or
- from farther back, or you shift the range of the axes so that the graph
- you just drew will be centered, the screen must be cleared so that a new
- coordinate grid can be drawn. So you're left with the viewing angle you
- wanted for that graph, but the screen is blank. You shouldn't have to
- solve this problem by retyping the whole equation again...and you don't.
- You can redraw the equation much more easily by selecting Pick graph in
- the Redraw menu. But with AutoRedraw ON, you don't even have to do that.
-
- As its name suggests, AutoRedraw will redraw the last equation(s) you
- typed in automatically when you change the scale or range. If you don't
- want a graph redrawn, you can abort it by pressing ESC twice and you
- will be returned to the equation editor. If you want to turn off
- AutoRedraw completely, just select AutoRedraw under the Options menu and
- answer "n" when asked if you want AutoRedraw on.
-
- To change the number of graphs redrawn automatically, you should also
- select AutoRedraw from the menu. After responding "y" when asked if you
- want it on, enter the number of graphs (1-25) that you would like to be
- redrawn each time AutoRedraw is invoked. (If there aren't that many in
- the queue, Graphmatica will just redraw them all.)
-
- AutoRedraw is ON by default. You can change the default to OFF by
- turning it off and using the Save Setup command to record this change in
- the GRAPHMAT.INI file.
-
- THE REDRAW QUEUE
-
- Every time you type in an equation, the character string you typed and
- the program's internal representation of that equation get stored in the
- redraw queue. From this queue, or list, you can call up any of the last
- 25 equations you typed to graph again with fewer keystrokes than
- retyping it. Or you can redraw all of them or the just the last one you
- typed with even fewer keystrokes. The equations in the queue are stored
- in an order that puts the most-recently-used at the beginning and the
- least-recently-used at the end. Hopefully, when the queue fills up, the
- equations that are bumped off the queue at the end will be the ones you
- won't miss very much.
-
- As explained above, the screen clears whenever you execute Range or a
- successful Scale (if you abort Scale the screen remains as it was). If
- you execute either of these functions or clear the screen accidentally
- with the Clear menu option, you can redraw the last equation (if
- AutoRedraw hasn't already) by selecting Last graph under Redraw, or you
- can redraw all of the equations in the queue using Redraw All under the
- Redraw menu. Note that the redraw function does not keep track of which
- graphs are on the screen at any point in time so "redrawing all" may put
- more (if you plotted many equations on the screen before the last one)
- or fewer (if you cleared the queue) equations on the screen than there
- were before the screen was cleared.
-
-
-
- IV. Using AutoRedraw and the Redraw Queue 21
- ------------------------------------------------------------------------
-
-
- REDRAWING MANUALLY
-
- The Pick graph option in the Redraw menu allows you to graph any
- equation currently in the redraw queue. First choose an equation from
- the combobox by clicking on it with the mouse or using the down key to
- highlight it and pressing enter. Then, choose Pick graph from the menu.
- (If you do not select an equation, Graphmatica redraws the first one in
- the queue.) When you pick a graph, it is re-inserted at the top of the
- redraw queue, as you'll likely be working with it again in the future.
- So if you scale the grid again, that graph will be Auto-Redrawn, and if
- you redraw the last graph, that graph will be shown.
-
- You can redraw a single equation more efficiently within the equation
- editor by selecting the equation as above and then simply pressing enter
- (do not modify the equation) while it is in the equation editor. The
- only advantage of the menu item is that it allows you to pick and redraw
- one-handed with a mouse.
-
-
- DELETING AN EQUATION
-
- To remove an equation that is no longer of interest from the queue,
- simply select that equation from the combobox (see Section I for
- details) and then choose the Delete Eqn item from the Redraw menu. The
- equation is then vaporized from the queue, although its graph will
- remain on the screen until you clear the screen.
-
-
- CLEARING THE REDRAW QUEUE
-
- Selecting Clear All from the Redraw menu essentially starts a new
- session, except the options settings and grid size remain the same.
- All of the equations in the queue are deleted, and the screen and labels
- (including annotations) are cleared as well.
-
-
-
- IV. Using AutoRedraw and the Redraw Queue 22
- ------------------------------------------------------------------------
-
- SAVING AND LOADING EQUATION LISTS
-
- To save the list of equations you're working on, as well as the title
- and y-axis labels if you've entered them, simply select Save List from
- the File menu and enter a filename. This file will be saved in the
- current directory with an extension of ".GR" (for GRaphmatica) unless
- you specify differently. To save to diskette, you simply have to insert
- "A:" or "B:" before your filename. Longer directories may not fit. When
- asked if you want to include setup information, answer "y" if you want
- to record the current size of the grid and options settings in the
- equation list file. Otherwise, only the text labels and equations in the
- queue are saved in the file.
-
- To reload your list of equations or load up one of the demo files
- provided with Graphmatica, you have more options. You can automatically
- load a file when you run Graphmatica by typing its name (with or without
- a file path or the ".GR" extension) as a command-line argument. Then
- those equations will be loaded up (and graphed) immediately after the
- opening screen, unless the file includes the autoredraw=off statement
- (see Appendix B: editing equation lists). You can also load an equation
- list at any time by selecting Open List from the File menu. You will
- be presented with a list of files available (if there are any) which can
- be selected using the up/down arrow keys or mouse. This list includes
- two special options, "[Cancel]" and "[New path]". Select cancel to
- return to the equation editor without loading a file, and new path to
- change the current directory to look for files elsewhere.
-
- After you select a file to load, if the redraw queue is not empty, you
- must decide whether to add the new file's equations to the existing
- queue or replace its current contents. Answer "y" to the prompt to clear
- the queue before loading the new file, or "n" to keep it.
-
- When the file has been loaded, if AutoRedraw is on Graphmatica will
- proceed to draw all of the equations just loaded (but not the ones that
- were previously in the queue, if you didn't clear it). You can abort
- these by pressing ESC twice on each if you are impatient. The graph
- title and Y-axis labels (if the file had any) that were loaded won't be
- displayed until you print or do a Print Preview (see Section VIII).
-
- If the file was saved with the Save setup option on, the grid and
- special options settings recorded in the file will be loaded and set
- automatically.
-
-
-
- Section ===============================================
- VVV VVV | View: Changing the appearance of the screen |
- V V ===============================================
- V V
- V V
- V o 23
- ------------------------------------------------------------------------
-
- CLEARING THE SCREEN
-
- Select Clear in the View menu to clear the screen. Everything will be
- erased and the grid will then be redrawn. Remember, every equation you
- have typed is still stored and can be redrawn later even after you have
- cleared the screen. If an error has garbled the whole screen, here's a
- hint to help regenerate it: first press ESC until the top menu bar is
- refreshed, and then use Clear to redraw the rest of the screen.
-
-
- CHANGING THE BACKGROUND GRAPH PAPER
-
- Graphmatica has three additional types of graph paper that may be more
- appropriate than the regular rectangular grid in some situations: polar
- paper and trig paper. Polar paper, instead of a grid of squares,
- consists of concentric circles marking the distance r, and radiating
- lines marking the angle theta at intervals of pi/6 radians. Trig paper,
- intended to ease interpretation of trigonometric functions, uses the
- regular rectangular grid but the x-axis is labelled in multiples of pi
- instead of integers. Logarithmic paper allows you to scale one or both
- axes logarithmically, so that, for instance, 0.1, 1, and 10 are equally
- spaced.
-
- You can choose from three levels of detail for the grid: none, reference
- dots, and full gridlines. Note that polar and rectangular paper look the
- same when you turn the grid off. Also, you can choose between five
- settings for the appearance of the x and y axes: no axes, plain axes
- with no decorations, axes with arrows on the positive end, axes labelled
- with "x" and "y", and axes with both arrows and labels. Note that even
- with "No axes" selected, the legends may still be displayed along the
- invisible axes unless you turn them off independently.
-
- You can change the graph paper type, grid detail, and axis decorations
- by selecting the Paper option from the View menu and responding to the
- prompts, "Select type of graph paper:", "Select grid detail level:", and
- finally "Select axis decorations:" appropriately.
-
- If you select Logarithmic paper, you will also be asked to specify a
- base and choose between semi-log (y axis only) and log-log paper (both
- axes logarithmic). If you choose base 10, you will see 9 lines per
- decade just like real graph paper if there is enough space to display
- them (generally when less than four decades are shown). Otherwise, the
- graph paper will look like normal rectangular, but with gridlines at
- integer powers of the base. Note that when you switch from or to log
- paper, the graphs that are on-screen will have to be recalculated, since
- the shape of the curves is distorted when you take the logarithm.
-
- Your choice of graph paper type, like all of Graphmatica's options, is
- recorded in your equation list files when you choose to save setup
- information, so when you load up an equation list later the correct
- type of graph paper will automatically be displayed. See the demo files
- TRIG.GR, POLAR.GR, and DIFEQ.GR for examples of this.
-
-
-
- V. View: Changing the Appearance of the Screen 24
- ------------------------------------------------------------------------
-
- CHANGING THE SCALE
-
- The scale function allows you to change the scale of the graph you have
- on-screen while keeping the center of the display the same (the origin
- may move but if (2,2) is at the middle of the screen, it will stay
- there). The scale is relative to the size of the grid that is presently
- on the screen, so you need not make any comparison with the default
- grid. To rescale the grid, select Scale from the View menu. Then you
- must provide a "scale factor" to tell the program how much to change the
- size of the grid.
-
- Enter a positive number to zoom in, or a negative number to pan out. (In
- the Camcorder terminology, a positive number acts as a telephoto and a
- negative as a wide-angle lens.) The number of units across the screen
- will be divided or multiplied by that number accordingly. Numbers
- between -1 and 1, inclusive, are not allowed because they produce
- meaningless values. Decimals greater than 1 or less than -1 are valid
- though.
-
- If you enter an invalid number, you will be asked to enter the scale
- again. To abort rescaling, leave the field blank and just press enter.
-
- The program remembers the value you type in and presents it as a default
- the next time you Scale the grid. The original default is "2".
-
-
- ADJUSTING THE RANGE
-
- Graphmatica allows you to adjust the start and end of the x- and y-
- ranges independently, so as to create a perfect fit for whatever
- function you are graphing. Or, you can constrain one or more of the
- coordinates to produce a graph with a square aspect ratio without
- actually figuring out all of the values by hand.
-
- Choose the Range item from the View menu to modify the grid. To create a
- "custom" grid, estimate the top-, bottom-, left- and rightmost
- extremities of the graph, and respond with the proper values to the 4
- Range prompts. The new grid may be somewhat expanded or compressed
- depending on the aspect ratio, but it will show the part of the graph
- you're interested in the best possible detail.
-
- To create a "square" grid where both x and y axis have the same scale,
- just type "auto" for any of the four coordinates and it will
- automatically be scaled properly to fit the other three. If you pick the
- least significant coordinate to AutoScale, you can match the other three
- exactly, framing your graph almost as well as a custom range, but with a
- more natural aspect ratio. If you want to show the same amount above as
- below the axis, type "auto" at both of the y-coordinate prompts and the
- top and bottom of the grid will be set to properly scaled equal and
- opposite values. (AutoScaling of both x-coordinates based on the height
- of the grid is not supported.)
-
- All range prompts allow you to input any valid expression, not just
- decimal numbers. You can easily enter very large or small numbers using
- scientific notation: e.g. 1.2*10^-8 for 0.000000012 or 3.4*10^7 for 34
- million.
-
-
-
- V. View: Changing the Appearance of the Screen 25
- ------------------------------------------------------------------------
-
- CHANGING THE RANGE OF THETA
-
- Because the independent variable (theta) in polar coordinates is
- fundamentally different from the 'x' of Cartesian coordinates, the
- Cartesian x/y ranges can only be used to determine the size of the
- screen and not the domain of the equation graphed for polar graphs.
- Although the default 0 to 2pi range is the typical range of theta used
- for most graphs that go on forever (like spirals) and some closed graphs
- (like circles), other graphs cannot be completely drawn in this range of
- theta. For instance, the figure-8-shaped "r^2=64cos(2t)", because it is
- undefined where the right half is less than zero, is missing a couple of
- spots unless theta's range is extended to -2pi to 2pi. To allow the
- greatest flexibility, Graphmatica allows theta's range to be changed
- independently of all other options.
-
- To change the range, select "T range" from the View menu and enter
- the start and end of the range you want (or press enter on the blank
- line to keep the current range). You can type in any expression,
- even using fractions and functions, as long as it evaluates to a
- constant. In particular, although Graphmatica works exclusively with
- radians, you can enter the range in degrees by typing in a number times
- the constant 'd', which converts degrees to radians, as in "45d" for 45
- degrees. You can also easily specify a radian measure as a multiple of
- pi, as in "2p" for 2 pi.
-
- If you would rather not change the default domain but simply change the
- domain for a single graph, see Section II "Specifying a Domain".
-
- CHANGING THE BACKGROUND COLOR
- Although I've hand picked the default colors for good contrast, if you
- find them dissatisfactory you have two alternate choices to the default
- charcoal gray grid: a white or black background. The graph colors stay
- the same, except for a few light colors which are replaced by darker
- ones on the white background. Hopefully, at least one of these color
- schemes will work for you.
-
- To change the color scheme, select Colors from the View menu, and select
- Gray, Black, or White. To make your choice of color "stick," select
- Save Setup from the File menu and it will be written to your
- graphmat.ini file. Note that color selection is not saved with .GR
- files, only in your personal setup, since it has more to do with your
- hardware than the equations you are working with.
-
-
-
- Section ==============================================
- VVV VVV III | Labels: Adding Explanatory Text to a Graph |
- V V I ==============================================
- V V I
- V V I
- V IIIo 26
- ------------------------------------------------------------------------
-
-
- AXIS LEGENDS
-
- By default, Graphmatica labels the hatch marks across the graph with the
- number of their coordinate so that you can more easily locate points or
- find the coordinates of a graphed point. In some cases, though,
- especially when doing graphs near the axes, the numbers can be confusing
- and you may want to turn them off. To do this, select the Legends option
- in the Labels menu. In the choice box, select the None button.
-
- If you find that the interval that is automatically chosen for the grid
- spacing is not well-suited to your task, select the Custom spacing
- button and you will be prompted for the increments you prefer for the X
- and Y axes. Next, you can choose between two behaviors when the grid
- size changes: 1) Lock the legend spacing to the values you selected, or
- 2) Scale the grid spacing along with the grid itself. Unfortunately,
- neither option will be likely to satisfy you if you change the grid
- spacing by a non-integer factor or by too much, so you may have to reset
- the spacing to more suitable increments again manually.
-
- To go back to the default behavior, select the Automatic spacing button
- in the Axis Legends dialog.
-
-
- ADDING TITLES TO YOUR GRAPHS
-
- If you want to add a title line and/or labels along the sides to your
- graph, select Titles from the Labels menu. You can type in a new title,
- edit one you typed in previously, or delete the title by pressing enter
- on the blank line. For the y-axis labels, the length of the string you
- can use depends on the number of rows you monitor has: CGA and EGA can
- hold 23 letters and VGA can hold 28. The program presents you with the
- previous label which you can edit, discard by pressing ESC and typing a
- new string, or turn off completely by pressing ESC and then enter on the
- blank line.
-
- When you print (or select Print Preview from the menu), the title is
- written across the top of the screen where the equation editor normally
- is, and it is automatically centered. Do not try to center the title
- manually when you are typing it in or it will interfere with the
- automatic centering. When you are graphing and the menu is active, the
- title line is not shown. Like the title, the y-axis labels are
- automatically centered (vertically) on the graph. Graphmatica does not
- draw these labels immediately, since they are intended mainly to enhance
- hardcopy printing, but they are also displayed if you perform the
- Preview option under the File menu.
-
- These two features were previously found in the View menu.
-
-
-
- VI. Labels: Adding Explanatory Text to a Graph 27
- ------------------------------------------------------------------------
-
-
- ANNOTATIONS
-
- Annotations are short text phrases which you can place anywhere on the
- graph surface to label intersections, zero-crossings, and other
- important points on your graphs. Graphmatica maintains a list of up to
- ten 30-character annotations.
-
- To add an annotation to the graph, select Annotate from the Labels menu.
- Type in the text you wish to use to label the graph and press enter. Now
- a crosshair cursor will appear. Move it with the keyboard or mouse to
- the position where you want the upper-left corner of the text. Then
- click the left button or press enter to paste it down. The text will
- appear on the screen immediately. Remember that it is associated with a
- logical x,y coordinate on the grid, not with the physical point you
- clicked on or with any particular equation. Thus, when you rescale the
- graph or change the range, the annotation will reappear at the same
- logical but not always the same physical position. Also note that
- annotations that would run off the screen cannot be drawn. You must zoom
- out so they are fully on the screen before they will appear.
-
- To edit a previously entered annotation, select the Edit Annote menu
- item from the Labels menu. Next choose the annotation to edit from the
- listbox. You can then choose the delete the annotation, change its text,
- or change its position. Pressing Esc at this prompt instead leaves the
- annotation unchanged.
-
- All of the annotations you have entered will be saved with any equation
- list you save, and will automatically be displayed again when you reload
- it. Like the graph title, the current annotations are cleared before
- loading a new file and when you Clear all of the equations from the
- redraw queue.
-
-
-
- Section =======================================
- VVV VVV III III | Viewing and Setting Special Options |
- V V I I =======================================
- V V I I
- V V I I
- V III IIIo 28
- ------------------------------------------------------------------------
-
- THE DEFAULT SETTINGS
-
- When you run Graphmatica without a GRAPHMAT.INI file, the following
- settings are in effect:
-
- Start of range: (-8.0, *)
- End of range: (8.0, *)
- Fineness: 1.0 **
- Legends: ON Warnings: OFF
- Printer: OFF AutoRedraw: ON
- AutoNum: 1 Graph paper: Rectangular, Grid
- Theta Range: 0 to 6.28 (2pi)
-
- * varies depending on video mode; always equal and opposite and scaled
- to provide a square aspect ratio.
- ** on CGA systems fineness is automatically set down to 0.75 to speed up
- graphing.
- This provides a basic rectangular grid of decent size with the origin
- centered, a square aspect ratio (a 1x1 square on the grid really LOOKS
- square), and a good resolution graph.
-
- VIEWING THE SETTINGS
-
- The current settings are almost always displayed whenever you change one
- of them. Every item under Options (unless aborted) will bring up the
- settings screen. You can also look at them manually by selecting
- Settings in the Options menu.
-
- SAVING SETUP INFORMATION
-
- You can save your preferred grid size and settings of other user options
- so that whenever you run Graphmatica again they will automatically be
- restored. You can do this at any time by selecting the Save Setup item
- in the File menu. The options will be saved in the GRAPHMAT.INI file in
- the current directory. If this is not where the program files are
- stored, Graphmatica will not be able to find it again, so if you change
- the directory using the load or save list commands, be sure to reset it
- before you save the setup.
-
- The setup file is just a special equation list that is loaded
- automatically when you start Graphmatica. It follows the same format as
- a normal equation list (described in Editing Equation Lists) except that
- when you save it Graphmatica leaves out the labels and the equations
- (the important parts of normal equation lists).
-
- When Graphmatica saves your options, to simplify things it only records
- those options that are different from its own internal defaults. (See
- Default Settings for a list of these.) If your settings are close to the
- defaults, your setup file will be very short.
-
-
-
- VII. Viewing and Setting Special Options 29
- ------------------------------------------------------------------------
-
- ADJUSTING THE FINENESS
-
- The fineness factor determines the resolution of the graph, and in
- effect, the amount of time it takes to draw it. The fineness factor of 1
- is quite adequate in most circumstances. Graphmatica's SmartFineness
- feature dynamically adjusts the actual step rate, making the manual
- fineness adjustment almost obsolete, but I left it in to accommodate the
- need for especially sharp graphs or for especially quick renderings.
- SmartFineness automatically decreases the fineness when the point being
- graphed is not on the screen to speed up blank areas, then recovers
- automatically and backtracks to the spot where the graph comes on-screen
- again. It also varies the fineness with the slope of the equation being
- graphed--less when the slope is near-horizontal, greater when the slope
- tends toward vertical, so steep graphs are tracked more effectively. As
- the fineness is increased, the curve will become smoother--to a point.
- Remember that for any increase in the fineness factor, there will be a
- proportional increase in the time it takes to draw a graph.
-
- If you have CGA adapter, Graphmatica assumes you are using an 8088-class
- PC and reduces the fineness to 0.75 to speed up graphing; the difference
- in resolution is usually not noticeable, but the difference in speed is.
-
- Fineness is also linked to the rate at which the angle is allowed to
- change in polar graphs, and Cartesian and Polar graphs will be of
- comparable quality at the same fineness factor. Fineness is also linked
- to the step rate of parametric graphs and differential equations;
- because they vary so much, it is harder to insure that all parametrics
- and dif-eqs will graph well at the default fineness, but those I have
- tested look fine.
-
- To change the fineness factor, select Fineness from the Options menu.
- Any value greater than zero is valid, but I would not recommend going
- below 0.25, as the image quality suffers and the graphs begin to look
- like modern art. Also, a factor greater than 5, in addition to being
- slow, can overflow the list of plotted points kept for quick redraws,
- which may actually cause the graph to display incorrectly if you change
- the graph paper or another option that forces the screen to be redrawn.
-
- WARNING MESSAGES
-
- By default, the error messages which do not require the equation to be
- edited are suppressed, because they slow down the graphing process,
- cover up the equation, and are somewhat annoying when you know the graph
- shouldn't produce any values in some area. (Also, it saves you the
- effort of specifying the domain for each equation.) If something goes
- wrong (e.g. the graph doesn't show up on screen when it should and the
- reason isn't readily apparent), you can turn on the warning messages
- (using the Warnings function of the Options menu) and redraw it to see
- what the problem is.
-
- CHANGING THE DRAWING MODE
-
- Graphmatica can render graphs in two ways: by drawing dots to represent
- the points it has calculated or by drawing lines to "connect the dots."
- By default, graphs are drawn using lines, because at a minimal expense
- of time, this makes the graphs much more visible. If you want, however,
- you can change the drawing mode to "dots" using the Draw Mode command in
- the Options menu.
-
-
-
- Section ====================================
- VVV VVV III III III | Using a Printer with Graphmatica |
- V V I I I ====================================
- V V I I I
- V V I I I
- V III III IIIo 30
- ------------------------------------------------------------------------
-
-
- PRINTING PICTURES OF YOUR GRAPHS
-
- Graphmatica includes two internal printing functions which work with CGA,
- EGA, and VGA and many common printers. To print, select the Print
- command from the File menu and then choose the printer type closest to
- your own. If you have an IBM, Epson, or compatible dot-matrix graphics-
- capable printer or a laser printer that doesn't support HP PCL but has
- Epson emulation, select Epson dot-matrix. If you have a Hewlett-Packard
- DeskJet, LaserJet, or other laser or ink jet printer compatible with
- the HP Printer Control Language Level III, choose HP LaserJet/DeskJet.
- If you didn't mean to choose the print command, press ESC to abort.
-
- Graphmatica does not check the printer's status, so you must have it on
- before you try to print.
-
- All the graphs on the screen will be printed on the printer, with the
- top of the screen at the top of the paper. At the bottom of the page is
- a list of the equations for the graphs Graphmatica thinks are presently
- on the screen. All graphs you have drawn since the last time the screen
- was cleared, except ones that you aborted by pressing ESC, are included
- in this list.
-
- If you want to abort the printing process, press ESC. Don't turn off or
- reset the printer until the "Printing..." message at the bottom of the
- screen is gone or DOS may print an error message and mess up the screen.
-
- The output is as close to what you see on the screen as I can make it,
- but since none of the supported display resolutions makes a very good
- match with the printer's resolution (aside from VGA on a LaserJet), I had
- to do some stretching and squeezing to make the printouts the right
- shape. Thus the size of the printout will vary between different monitor
- types because to make the grid square, I had to expand the x axis
- different amounts to make up for the different vertical resolutions.
-
- On dot matrix printers, for CGA mode, the x direction is expanded by 33%
- and the y by 100%. For EGA, the x is expanded by 20% and the y remains
- as it was read off the screen. For VGA, the x is expanded 50% and the y
- is compressed about 9% by merging pairs of adjacent lines. For super-
- VGA (800x600), the x direction is expanded by 20% and the y is
- compressed by 27% by merging adjacent lines. For this reason, dot matrix
- printouts at high resolutions may not be as sharp as EGA resolution
-
- On laser printers, Graphmatica produces crisper, more compact images due
- to the superior resolution. The VGA image will print the best with a
- laser printer: every point is mapped on a one-to-one basis due to the
- square aspect ratios of both the screen and printer. EGA and CGA images
- are scaled accordingly so the output isn't squashed, and they print
- graphics that are not as sharp but still much better than dot-matrix
- output.
-
-
-
- VIII. Using a Printer with Graphmatica 31
- ------------------------------------------------------------------------
-
- NOTES ON PRINTING
-
- Graphmatica assumes your printer resides at LPT1:. If your printer is
- not connected to the parallel port but to the serial port instead, you
- must use the DOS "mode" command to redirect the output if you want to
- use the printer. For most people, the command would be
- C:\>mode lpt1 = com1
- You need to use this command only once before you run Graphmatica; DOS
- will remember the redirection until you shut off the computer or reboot.
-
- If you have a color printer and a paint program that can print in
- color, you may want to export the grid to a PCX file and use the paint
- program to print. (Graphmatica for DOS can only print in black & white.)
-
-
- PRINT PREVIEW
-
- To see how the screen will look when it is printed, simply select the
- Preview option from the Print menu. In EGA and VGA modes, you can choose
- between color and monochrome preview. Super-VGA does not have any
- corresponding monochrome mode available, unfortunately.
-
- The menu bar and help line will clear, and the graph title and y-axis
- labels (if any) will be drawn on the screen. If you have a color printer
- that works better with an external print screen function, this is the
- perfect time to press the Print Screen button (if you have a mouse, be
- sure to hide the arrow at the bottom of the screen first). In any case,
- you can look at it as long as you need to. When you want to return to
- work, just press any key or mouse button and the menu will reappear.
- (The side labels are not erased, however; they must be cleared manually.
-
-
- EXPORTING .PCX FILES
-
- If you want to include a picture of your graphs in a word processor
- document, or modify the default appearance of the grid before printing
- it, you can export the current grid to a Zsoft PC-Paintbrush (PCX) file
- by choosing the Export PCX option in the file menu. You can choose
- between color (in EGA/VGA modes) and two monochrome (black on white and
- white on black) palettes for the bitmap. Then enter a file name for the
- output (you need not include the .pcx extension). Note that this process
- may take a few seconds on 386 and slower computers, as I have not
- optimized the assembly code for this rather intensive operation.
-
-
- PRINTING VALUES
-
- This feature allows you to print out a table of coordinates as the
- program is drawing your graph. This option is available to aid the
- drawing of graphs manually (if you happen to be cheating on your
- homework) and provide a reference for labeling the axes if you print the
- graph without the legends on.
-
- By default, the print tables option is OFF; most people don't leave
- their printer on at all times and the process slows down graphing. You
- can turn it on by selecting Tables in the Options menu and responding
- "y" to the prompt.
-
-
-
- Section ==========================================
- III XX XX | Point menu: evaluating specific points |
- I X X ==========================================
- I XX
- I X X
- III XX XX o 32
- ------------------------------------------------------------------------
-
- Graphmatica provides two features to help you get numerical results
- from your equations. Both are located in the Point menu.
-
- NUMERICALLY EVALUATING A POINT
-
- The Evaluate command in the point menu allows you to quickly find the
- value of any equation you've entered at a specific point. First choose
- an equation from the queue by selecting it in the equation combobox. (If
- you do not choose an equation, Graphmatica will select the last one
- graphed for you.) Then choose the Evaluate command from the Point menu.
- You will be asked to enter a value for the selected equation's
- independent variable. Any expression that evaluates to a constant is OK,
- including fractions and constants. (e.g. "3/4" or "pi")
-
- Graphmatica will calculate the value of the dependent variable(s) at
- this point and display the result. For function families that use the
- parameter 'a', only the starting value of 'a' will be used, since only
- one result can be displayed. (Note that if an error occurs when
- evaluating at the point, a message will be displayed on the bottom line
- regardless of the state of the Warning Messages option.) Press any key
- to type in another point to evaluate. When you want to stop evaluating
- points, press ESC to return to the menu.
-
- (Point Evaluate cannot be used for slope-field ODE approximations, since
- they are not really functions of a single variable.)
-
- THE COORDINATE CURSOR
-
- If the point you're interested in is on-screen, you can use the
- coordinate cursor to estimate its coordinates. Simply select Cursor from
- the Point menu. (If you have a mouse, you can also just hold down the
- right mouse button.) The crosshairs will appear at the current position
- of the mouse pointer and will respond to both the mouse and the arrow
- keys. As you move the crosshairs, the coordinates are displayed at the
- bottom of the screen. To exit the coordinate cursor, click either mouse
- button or press ESC. When you use the keyboard to position the pointer,
- it moves about 20 pixels with each keypress, so you can move rapidly
- from one side of the screen to the other. To move the crosshair one
- pixel at a time, hold down the Ctrl key and then press the arrow keys.
-
- When you move the cursor close enough to one of the curves on-screen, it
- will automatically "lock on" to make it easier to trace the path of the
- curve. When this happens, the equation of the curve being traced is also
- displayed in the status bar. The crosshair will stick to the curve you
- chose, even if it intersects other graphs, as long as you move the
- cursor gently in the general direction of the curve. To release the
- cursor from a curve, move perpendicularly to the slope of the curve at
- that point, or just move quickly in any direction.
-
- Remember that the values reported by the coordinate cursor are limited
- by the resolution of your screen. At the default grid size, values may
- be off by 0.01 or more. For best results, zoom in on the section of the
- graph you are interested in first, or use the Evaluate command.
-
-
-
- Section ======================================================
- XX XX | Calculus menu: Derivatives, Tangents and Integrals |
- X X ======================================================
- XX
- X X
- XX XX o 33
- ------------------------------------------------------------------------
-
- FINDING THE DERIVATIVE OF A FUNCTION
-
- Graphmatica is able to perform symbolic differentiation on most common
- functions and to display the derivative of a given curve in both text
- and graphical formats. To differentiate a function, select it in the
- queue and then Choose Find Derivative from the Calculus menu. (If the
- function you want to use is not in the queue, you must graph it first.)
- The program will then manipulate its internal representation of the
- equation to produce its derivative, add the resulting equation to the
- queue, and immediately graph it.
-
- Note that while the curve produced by this process will always be
- correct, the equation of the curve may not be very well simplified,
- especially for complex equations. Therefore, the best way to check a
- derivative you found by hand is to overlay its graph with the program's.
-
- Finding the derivative is only supported for Cartesian, polar, and
- parametric equations. For relations such as equations containing y^2,
- the derivative is only found for the function with the positive root.
- For equations with more than one y, the derivative is found with repsect
- to y instead of x. For parametric equations, the derivative is found by
- differentiating the x and y functions separately with respect to t.
-
- Equations containing the following functions are not differentiable:
- int not a continuous function
- abs not guaranteed to be a smooth function
-
-
- DRAWING TANGENT LINES
-
- At times you may be interested in knowing the slope of a curve at a
- given point. Graphmatica will provide this information both numerically
- and graphically about any curve on the screen with just a few clicks of
- the mouse.
-
- To calculate the slope of a curve and draw the tangent line at a
- specific point, first select Draw Tangent from the Calculus menu. The
- cursor will change to the crosshairs. Use the mouse or arrow keys to
- move to a point on any curve on the screen, then click or press enter to
- select it. The program will draw the tangent line and display the point
- selected and the slope on the status line as well as in the Printout
- window if it is on. The tangent line will be displayed only until you
- hide or delete the equation it belongs to, clear the screen, or draw
- another tangent line.
-
- Currently, you can only find the tangent line for differentiable
- Cartesian and polar equations (i.e. those which do not include the int()
- or abs() functions). At this time, there is no efficient way to produce
- accurate results for other curves (for parametric equations you will get
- a rough approximation based on the slope between the two consecutive
- points nearest where you clicked). Support for other equation types and
- saving and restoring tangent lines along with equation lists will be
- added to a future version of the program if enough people request it.
-
-
-
- X. Calculus menu: Derivatives, Tangents and Integrals 34
- ------------------------------------------------------------------------
-
- INTEGRATING TO FIND THE AREA UNDER A CURVE
-
- Graphmatica can perform numerical integration to find the area under the
- curve for any function on the screen. Just select Integrate from the
- Calculus menu. The cursor will change to the crosshairs.
-
- To select a curve and region to integrate over, do one of the following:
- * With the keyboard, use the arrow keys to move the crosshair to the
- starting point on the curve you want to integrate. Press enter, then
- move to the x-value of the end of the range to integrate. Press enter
- again.
- * With the mouse, click on the starting point on the curve and drag the
- mouse to the endpoint of the region to integrate. The interval you
- select is highlighted as you move the cursor.
-
- The program will shade in the area that was found and display the
- numerical result in the status bar, as well as send it to the printer
- if you have Print Tables on. If you select a region under the axis, or
- highlight the region above the axis from right to left, you will get a
- negative area. The shading will be cleared as soon as you hide or delete
- the equation it belongs to, clear the screen, or perform another
- integration.
-
- You can choose from several methods of integration, as well as
- specifying how many segments to divide the region into, to select more
- accurate or faster computation. See below for details.
-
- Any integral shading you create will appear on the grid when you print
- or copy to a bitmap; however, it will not be listed with the rest of the
- equations. Currently, there is no provision for saving or restoring
- integration regions, or for showing more than one shaded region at a
- time. This, along with finding the area between two curves, will be
- implemented in a future version of the program.
-
-
- SETTING INTEGRATION OPTIONS
-
- You can choose between two methods of integration, as well as optionally
- specify how many segments to divide the selected region into, to select
- more accurate or faster computation. To modify the integration options,
- select Int Options from the Calculus menu. Then choose between the
- Trapezoidal and Simpson's Rule for the integration method. Simpson's
- Rule tends to produce more accurate results, as long as the curve is
- smooth in the region you are integrating.
-
- You can also set the number of segments to divide the region into when
- calculating the area. This must be a positive integer, and if you use
- Simpson's Rule, it must be an even number. The higher the number, the
- more accurate the result will be, but the longer it will take to
- calculate it. By default (and if you type "auto" instead of a number
- here) Graphmatica chooses the number of segments automatically to be
- half of the width of the area you selected in screen pixels.
-
-
- Appendix ========================================
- AAAA | Graphmatica's Command Line Arguments |
- A A ========================================
- AAAAAA
- A A
- A Ao 35
- ------------------------------------------------------------------------
-
- With the introduction of the GRAPHMAT.INI file, which will not only
- save your preferred options automatically from inside Graphmatica but
- will also reset them automatically the next time you run the program,
- most of the command line arguments that GraphIt! version 2.80 supported
- were removed in version 3.0. [Although you shouldn't need to edit the
- setup file yourself at all, its format is described in Appendix B.]
-
- Arguments are NOT case sensitive (upper-case and lower-case letters
- are treated exactly the same). Arguments must be separated by one or
- more spaces on the command line. Excluding filenames, the other
- argument must begin with the standard MS-DOS "switch" character ("/").
- UNIX-style switches (starting with "-") are NOT supported.
-
-
- /G:xxxxxx Graph Equation
- -------------------------------
- If you want to start up Graphmatica by automatically graphing one or
- more equations, use the /G: option. The only limits on the number
- of equations you can include on the command line are the capacity
- of the redraw queue (25 equations) and, of course, the maximum
- length of the command line (I think it's around 128 characters).
- The equation(s) will be parsed and graphed in exactly the same way
- as the regular prompted input, with one exception: if you want to
- include any spaces in the equation, you must enclose the whole
- "/G:xxxx" string in quotation marks or the spaces will be
- interpreted as delimiters between arguments. As the Graphmatica
- editor is far superior to the DOS command line editor, this option
- has limited usefulness, but it is a good interface for execution
- from a batch file.
-
- /V Use VESA 800x600 mode
- ------------------------------
- Because the signals that high-resolution video cards produce may
- physically damage monitors that are not capable of displaying them,
- Graphmatica does not attempt to detect super-VGA cards. If you know
- your monitor is capable of supporting this mode and you have a VESA-
- compatible video card (or a TSR VESA driver), you can select 800x600
- resolution with this switch. kSoft ASSUMES NO LIABILITY FOR ANY
- DAMAGE CAUSED BY IMPROPER USE OF THIS SETTING. If your card is not
- compatible with this mode, Graphmatica will select standard VGA.
- The Microsoft mouse driver, version 8.20, does not fully support
- these modes. (The mouse cursor does not display.) A newer version of
- this or another mouse driver may.
-
- filename[.ext]
- --------------
- Specifying the name of a valid equation list file (with or without
- the ".GR" extension) loads that file upon startup. Unless
- AUTOREDRAW=OFF is specified in the [options] section of the file
- loaded (assuming it has one), the graphs are drawn as soon as the
- opening screen is gone. Note that the settings saved in GRAPHMAT.INI
- are loaded before any equation list files you specify.
-
-
-
- Appendix ===========================================
- BBBB | Editing Equation Lists and GRAPHMAT.INI |
- B B ===========================================
- BBBB
- B B
- BBBB o 36
- ------------------------------------------------------------------------
-
- Graphmatica does not really provide facilities for maintaining equation
- lists; although you can edit an equation and change the order of
- equations by redrawing selected graphs, determining the precise order of
- equations in the list is difficult since they are dynamically shuffled
- each time an equation is entered or redrawn to make Graphmatica more
- interactive. However, the equation list is just a text file whose
- structure is virtually identical to the win.ini file, you can create or
- modify one with virtually any editor. The structure goes like this:
- (sections in parentheses are explanations; don't type them in.)
-
- [saved-setup] (if present, resets all options to defaults before
- load to ensure the saved setup is restored correctly)
- [labels]
- title = xxxx (any character string, up to 76 chars.)
- left = xxxx
- right = xxxx
-
- [grid]
- left = #.## (left side of grid) (any decimal number)
- right = #.## (right side of grid) (or "auto" to autoscale)
- top = #.## (top of grid)
- bottom = #.## (bottom of grid)
-
- [options]
- paper = polar, trig, rect, slog or llog (controls graph paper type)
- detail = none, axes, dots, or grid (controls paper detail level)
- autoredraw = on or off (controls AutoRedraw) ("on" or "off")
- autonum = ## (number of equations to A.R.) (any integer 0-25)
- legends = on or off (controls axis legends (numbers))
- _color = 1,2, or mono _
- | hogcpu = on or off |
- | widelines = on or off | valid under Graphmatica for Windows ONLY
- | autosquare = on or off | Graphmatica for DOS ignores these 4 settings
- |_labels = on or off _|
- tables = on or off (controls print tables feature)
- warnings = on or off (controls warning error messages)
- defscale = #.## (default for "Scale" prompt - any decimal number)
- fineness = #.## (default fineness value)
- tstart = #.## (default start of theta's domain)
- tstop = #.## (default end of theta's domain)
-
- [equations]
- (up to 25 equations, each up to 200 characters, each on a separate line)
-
- The [labels] section specifies the title and y-axis labels. The [grid]
- section gives the left, right, top and bottom coordinates of the grid.
- Type "auto" for any one to auto-scale that coordinate based on the other
- three. Type auto for both the top and bottom to auto-scale the y-axis so
- the top and bottom coordinates are equal and opposite.
-
-
-
- B. Editing equation lists and GRAPHMAT.INI 37
- ------------------------------------------------------------------------
-
- You can omit any item or even a complete section if you don't want to
- change the default. Type exactly as specified above, including the
- brackets "[ ]" around the section headings, but replacing the values on
- the right side of the equals signs with your own values. If you don't
- know or don't care what the value is for an option, just leave the line
- out. Don't worry about capitalization, extra spaces, or even extra blank
- lines. (However, each entry must be on a separate line or some may be
- ignored.) You can put the options and sections in any order ... the only
- requirement is that the [equations] section must come last, if there is
- one. Invalid options are also ignored.
-
- If you want to create a file with no titles or options, simply type the
- "[equations]" header and then type all of your equations. Each equation
- must be on a separate line. There is one catch, however: since
- Graphmatica graphs the most recently entered equation first when it
- redraws, when the list is loaded and graphed, the equation listed LAST
- will be graphed FIRST. (It is certainly possible to correct this
- situation by graphing the equations as they come in, but then every
- subsequent "redraw all" command would draw the list backwards anyway.)
- If you load an equation list and immediately save it without changing
- anything, the net effect will be that the order of the equations in the
- file is reversed.
-
- The GRAPHMAT.INI file, which is loaded whenever you run Graphmatica
- without specifying an equation list to load, uses the exact same
- format... when you choose the Save Setup command, Graphmatica simply
- saves the setup file as it would an equation list, except the [labels]
- and [equations] sections are omitted, since you probably don't want to
- have the same graph title and equations load up automatically forever
- and ever.
-
- CONVERTING OLD EQUATION LISTS
-
- Anybody who upgraded from GraphIt! for DOS version 2.80 who wants to
- convert equation list files from the original format to one compatible
- with Graphmatica for DOS 3.5, please contact me and I will explain the
- process.
-
-
-
- Appendix ====================================
- CCCC | Upgrade Notes: Changes from 3.30 |
- C ====================================
- C
- C
- CCCC o 38
- ------------------------------------------------------------------------
-
- Version 3.5 is a major update which adds a number of features previously
- only available in Graphmatica for Windows, as well as most of the new
- features of version 1.5 for Windows. Please take a minute to acquaint
- yourself with them:
-
- The following features were enhanced:
- 1. Incorrect "-" associativity in parser of version 3.30 fixed.
- 2. Long equations (> 128 characters) that were occasionally truncated
- should no longer be molested.
- 3. Exponents of the form x^(2/3) are graphed correctly (positive for
- all x). Exponents of the form x^(1/3) are graphed correctly (same
- sign as x). All other non-integer exponents are graphed
- conservatively, so they may cause a domain error warning, but NOT an
- incorrect graph.
- 4. Steep functions that go off screen but should reappear again at
- larger values of x should no longer be in danger of missing lobes
- (except in the most extreme cases).
- 5. The parser has been totally rewritten from scratch for better
- reliability and expansion. Now, function arguments are defined
- precisely to be the first term following the function name, or
- everything in parentheses following the function name.
- 6. AutoRedraw draws all graphs on the screen by default now; set the
- "number of equations to redraw" to limit it to fewer.
- 7. Delete Equation removes the graph from the screen as well as from
- the queue if it is present, to reduce clutter.
- 8. Increasing the fineness factor now forces recalculation of graphs
- on the screen immediately.
- 9. Parametric graphs offer smarter dynamic fineness based on absolute
- distance between consecutive points on the screen to allow fast
- graphing over any domain without worrying about curves becoming
- jagged. Also, a new option allows you to select the step rate
- manually by including it as a third parameter in the domain.
- 10. ODE approximation initial values no longer need appear on the
- screen. Also, the approximation is run until the independent value
- reaches the edge of the screen, not just until the curve goes off
- screen, so curves that return on screen will be drawn in entirety.
- 11. Coordinate cursor automatically "locks on" to curves when moved
- close enough, making it easier to get accurate readings.
- 12. Equation picking using the mouse. Clicking on a curve will now
- select the curve in the equation listbox so you can see its equation
- on the status line and then edit it, delete it, etc.
- 13. Added mouse-oriented features found in the Windows version: select
- a region and then choose Range from the View menu to zoom in to the
- displayed range; hold down right mouse button for coordinate cursor.
- 14. Refined menu and scrollbar mouse support allow true Mac-type pulldown
- menus and continuous scrolling in listboxes.
-
-
-
- C. Upgrade Notes: Changes from 3.30 39
- ------------------------------------------------------------------------
-
- The following new features were added:
- 1. New Calculus menu offers the following useful features:
- + Symbolic differentiation using the "Find Derivative" option. Finds
- and graphs the derivative of the currently-selected equation. Works
- on most Cartesian and polar graphs.
- + Draw Tangent Line option allows you to click on a specific point
- on a curve to find the slope at that point, as well as draw the
- tangent line so you can see it graphically as well.
- + Integrate function lets you select a curve and an area to
- integrate with two mouse clicks and performs numerical integration
- to find the area under the curve by trapezoidal or Simpson's methods
- with selectable number of segments.
- 2. Support for up to 4th order systems of ODEs added. Use the variables
- t,x,y,z,w and the corresponding differentials (dx, dy, etc.) to set
- up a system of equations separated by ';' much like parametrics. You
- can also use t,x1,x2,x3,x4. All curves in the system are graphed in
- different colors so you can tell them apart. You can even select all
- of the required initial values with the mouse using the Set Initial
- Value menu item.
- 3. Added support for exporting to color or monochrome PCX files, so you
- can include graphs in other documents.
- 4. New Hide Graph function removes the graph of an equation from the
- screen without deleting it.
- 5. Spacing between axes legends can now be specified manually for times
- when the automatic spacing adjustment isn't good enough. Select
- Legends from the Labels menu to try it out.
- 6. New user-settable axis decorations add to the diversity of graph
- paper choices. Now you can add arrows and labels to the axes, or
- turn them off independently of the gridlines. Look at the revised
- Paper item in the View menu.
- 7. You can now select a domain using the mouse for Cartesian equations
- and ODEs.
- 8. You can now plot Cartesian equations which are functions of y, not x.
- 9. New floating-point error handler should prevent any crashes or
- unsightly messages from library routines due to complex equations
- or extremely large or small grid ranges.
-
- I hope you find these new features beneficial. If you'd like to support
- future versions with your comments and suggestions, see Appendix D or
- the included REGISTER.TXT for the mail-in survey form.
-
-
-
- Appendix ==========================
- DDDDD | Shareware / Order Form |
- D D ==========================
- D D
- D D
- DDDDD o 40
- ------------------------------------------------------------------------
-
- Shareware: Feel free to distribute copies of Graphmatica to your friends
- and upload to BBS's where others can donwload it AS LONG AS 1) you
- charge no fees for its use or distribution and 2) you do not modify the
- program or documentation files in any way.
-
- [Shareware catalogs have permission to distribute this product for no
- more than $5 a copy. However, please contact me to make sure you have
- the latest version before you do so.]
-
- This program is to be taken AS IS with no warranties, express or implied.
- Although I know of no serious bugs, kSoft will not be held liable for any
- damage caused by use, misuse, or inability to use the program. However,
- if you tell me about any bugs you may find, I will try to correct them
- in the next release.
-
- If, after using Graphmatica, you find that it is easy, helpful, and
- convenient to use, please support the release of future versions by
- filling out the registration form on the next page and sending your
- contribution (payable to Keith Hertzer) to the address below:
-
- kSoft, Inc.
- 345 Montecillo Dr.
- Walnut Creek, CA 94595-2613
-
- If you send $20 or more, you will be registered to receive a diskette
- with the next versions of Graphmatica for DOS and Windows when they
- become available. For releases after that, you will be informed that a
- new version is available and how you can get it. Orders outside of North
- America: please add $5 for shipping if you want to receive your upgrade
- via air mail.
-
- Even if you cannot send any money, please help me out by filling out the
- response form below, especially if you have any suggestions about what I
- should add to the next upgrade.
-
- You can register Graphmatica via CompuServe's Shareware registration
- database. The ID number is 111. Type GO SWREG to start the transaction.
- The fee of $25 US will be added to your monthly bill.
-
- I can also accept credit card orders through Public (software) Library.
- Prices including handling are $27.50 (US & Canada) and $30 elsewhere.
- Please see README.TXT for details.
-
- WHAT'S NEXT? I am slowly proceeding with Graphmatica 3D, which may or
- may not have a DOS version. If you still don't have Windows, and want to
- use this program, please let me know. If there is sufficient user
- support I will release DOS as well as Windows versions.
-
- If you would like a copy of the source code for Graphmatica for DOS
- (developed in C using Microsoft Visual C++ 1.5), please send me a check
- for $25 and a short note telling why you would like it.
-
- --G3.5r--------------------kSoft REGISTRATION FORM--------------------12/96--
-
- Name & E-mail
- Company _______________________________________ Address _____________________
-
-
- Address _____________________________________________________________________
-
- State/ Postal
- City ________________________________ Country _______ Code _______________
- _
- |_| Enclosed is my $25 or more contribution. Please register me to
- receive the next upgrade to Graphmatica for DOS.
- _
- |_| Enclosed is my $25 or more contribution. I want Graphmatica for Windows
- NOW! Please use my upgrade credit to send me the current version.
- _
- |_| Please send me the source code [for MSVC 1.5] to Graphmatica for DOS
- 3.5. I have enclosed a note on why I'd like it and a check for $25.
-
- ------------(make checks in US funds payable to KEITH HERTZER)---------------
-
- What size diskettes do you use? 5 1/4" 3 1/2"
-
- Where did you get Graphmatica? (name of BBS or catalog: ________________)
-
- From a friend Local BBS CompuServe Internet Catalog
-
- What processor are you using to run Graphmatica for Windows? (circle one)
-
- 286 386 486 Pentium Other (___________)
-
- If you use a printer with Graphmatica, what type is it?
-
- dot-matrix ink jet laser Other (___________)
-
- What type of video card do you have? Mono CGA
-
- EGA VGA SVGA Other (___________)
-
-
- What DOS version do you usually run with Graphmatica? ___________
-
- What features do you like best about Graphmatica?
-
- _____________________________________________________________________________
-
- _____________________________________________________________________________
-
- What problems have you experienced with Graphmatica?
-
- _____________________________________________________________________________
-
- _____________________________________________________________________________
-
- Any other comments or suggestions for improvement in the next upgrade?
- (Your comments are vital so I will know what to change or add. Please
- feel free to use the back or another sheet of paper.)
-
- _____________________________________________________________________________
-
- _____________________________________________________________________________
- Please send to: kSoft, Inc., 345 Montecillo Dr., Walnut Creek, CA 94595-2613.
-
-